﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Windows.Data;

namespace CitiSurface
{
    class DoublePorportionConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (parameter as string == null)
                return value;

            var parm = double.Parse(parameter as string);
            return ((double)value)*parm;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new Exception("ConvertBack is not implemented yet!");
        }
    }
}
